<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta content="" name="description" />
    <meta content="webthemez" name="author" />
    <title>Bootstrap Admin Theme</title>
  <!-- Bootstrap Styles-->
    <link href="__PUBLIC__static/admin/assets/css/bootstrap.css" rel="stylesheet" />
     <!-- FontAwesome Styles-->
    <link href="__PUBLIC__static/admin/assets/css/font-awesome.css" rel="stylesheet" />

    <link href="__PUBLIC__static/admin/assets/css/select2.min.css" rel="stylesheet" >
  <link href="__PUBLIC__static/admin/assets/css/checkbox3.min.css" rel="stylesheet" >
        <!-- Custom Styles-->
    <link href="__PUBLIC__static/admin/assets/css/custom-styles.css" rel="stylesheet" />
     <!-- Google Fonts-->

     <style type="text/css">
    h1 { font-size: 20px; margin-bottom:3px; }
    h3 { font-size: 13px; margin-top:0px; }
    .main { text-align: center; }
    .time { display:inline-block; font-size:26px; padding:5px; text-align:center; width:86px; }
  </style>
   <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />

</head>
<body>
    <div id="wrapper">
        {include file="layout/top" / }
        <!--/. NAV TOP  -->
      {include file="layout/left" / }
        <!-- /. NAV SIDE  -->
        <div id="page-wrapper" >
     <div class="col-md-12">
      <div class="panel panel-default">
        <div class="panel-heading">
         提示:
        </div>

              <div class="panel-body">
                <div class="alert alert-success">
                  <strong>Prompt!</strong>  &nbsp&nbsp请上传jpg格式图片!
                </div>

              </div>
        </div>
      </div>

    <form class="form-horizontal row-fluid"  enctype="multipart/form-data" method ='post'action ="{:url('admin/shop/do_tube')}">
            <div id="page-inner">
                       <div class="row">
                        <div class="col-xs-12">
                            <div class="panel panel-default">

                               <input type="hidden" name="id" value="{$data['iid']}">
                                <div class="panel-body">

                                    <div class="sub-title"><span style="font-size:20px">店铺名称</span></div>
                                    <div>
                                        <input type="text" value="{$data['business_name']}" name="business_name" class="form-control" style="width:60%" placeholder="Name ...">
                                    </div>
                                    <div class="sub-title"><span style="font-size:20px">店铺logo</span></div>
                                      <div>

                                          <input type="file" name="img" />

                                        </div>
                                     <div class="sub-title"><span style="font-size:20px">店铺地址</span></div>
                                    <div>
                                        <input type="text" value="{$data['business_address']}" name="business_address" class="form-control" style="width:60%" placeholder="Name ...">
                                    </div>

                                     <div class="sub-title"><span style="font-size:20px">店铺排序</span></div>
                                    <div>
                                        <input type="number" value="{$data['isort']}" name="sort" class="form-control" style="width:60%" placeholder="Name ...">
                                    </div>

                                    <div class="sub-title"><span style="font-size:20px">店铺浏览量</span></div>
                                    <div>
                                        <input type="text" value="{$data['browsingvolume']}" name="browsingvolume" class="form-control" style="width:60%" placeholder="Name ...">
                                    </div>

                                    <div class="sub-title"><span style="font-size:20px">店铺分享量</span></div>
                                    <div>
                                        <input type="text" value="{$data['fenxiang']}" name="fenxiang" class="form-control" style="width:60%" placeholder="Name ...">
                                    </div>


                                    <div class="sub-title"><span style="font-size:20px">主营类目</span></div>
                                    <br>
                                    <div>
                                        <select style="width: 200px;" name="business_fid" class="selectbox">

                                          {foreach $type as $v}
                                                {eq name="$v['id']" value="$data['id']" }
                                                <option selected = "selected" value="{$v['id']}">{$v['shop_type_name']}</option>
                                               {else /}
                                                <option value="{$v['id']}">{$v['shop_type_name']}</option>
                                               {/eq}
                                          {/foreach}

                                        </select>
                                    </div>


                                     <div class="sub-title"><span style="font-size:20px">首页推荐</span></div>
                                    <br>
                                    <div>

                                        <select style="width: 200px;" name="tuijian" class="selectbox">



                                                <option {eq name="$tuijian" value="0" } selected = "selected"{/eq} value="0">否</option>
                                                 <option {eq name="$tuijian" value="1" } selected = "selected"{/eq} value="1">是</option>




                                        </select>
                                    </div>

                                     <div class="sub-title"><span style="font-size:20px">店铺介绍</span></div>
                                    <div>
                                        <textarea id="t1" class="form-control" name="business_description" style="width:60%" rows="3"></textarea>
                                    </div>

                                    <div class="sub-title"><span style="font-size:20px">店铺公告</span></div>
                                    <div>
                                        <textarea id="t2" class="form-control" name="business_announcement" style="width:60%" rows="3"></textarea>
                                    </div>


                                     <div class="sub-title"><span style="font-size:20px">开门时间</span></div>
                                    <div>
                                         <input class="time" type="text" name="business_action_time" value="{$data['business_action_time']}" />
                                    </div>

                                    <div class="sub-title"><span style="font-size:20px">打烊时间</span></div>
                                    <div>
                                         <input class="time" type="text" name="business_last_time" value="{$data['business_last_time']}" />
                                    </div>
                                     <div class="sub-title"><span style="font-size:20px">联系电话</span></div>
                                    <div>
                                        <input type="text" style="width:60%" name="business_tel" class="form-control" value="{$data['business_tel']}">
                                    </div>

                                    <div class="sub-title"><span style="font-size:20px">店铺坐标</span></div>

                                    <div>
                                         <div class="col-xs-4 col-sm-4">
                                        <input type="text" name="business_lng" id="business_lng" value="{$data.business_lng}" placeholder="地理经度"  class="form-control" />
                                    </div>
                                    <div class="col-xs-4 col-sm-4">
                                        <input type="text" name="business_lat" id="business_lat" value="{$data.business_lat}" placeholder="地理纬度"  class="form-control" />
                                    </div>

                                      <br>
                                    <script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=ox3rlNd0GLgzx8cCesUtxSQW7NcS7GnI "></script>
                                    <div style="width:520px;height:340px;border:1px solid gray;margin-left: 20px" id="container"></div>




                                    <br><br>
                                        <div  style="text-align:center">
                                        <button type="submit" class="btn btn-default">确定</button>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>


            <script type="text/javascript">

//                                         var map = new BMap.Map("container");          // 创建地图实例
//
//                                         var point = new BMap.Point(116.404, 39.915);  // 创建点坐标
//
//                                         map.centerAndZoom(point, 15);                 // 初始化地图，设置中心点坐标和地图级别
                                        var map = new BMap.Map("container");
                                        map.centerAndZoom("杭州",12);
                                        //单击获取点击的经纬度
                                        map.addEventListener("click",function(e){
                                            var lng=e.point.lng;
                                            var lat=e.point.lat;
                                            $('#business_lng').val(lng);
                                            $('#business_lat').val(lat);
                                        });
                                        </script>

    <!-- jQuery Js -->
    <script src="__PUBLIC__static/admin/assets/js/jquery-1.10.2.js"></script>
      <!-- Bootstrap Js -->
    <script src="__PUBLIC__static/admin/assets/js/bootstrap.min.js"></script>
    <!-- Metis Menu Js -->
    <script src="__PUBLIC__static/admin/assets/js/jquery.metisMenu.js"></script>
    <script>
document.getElementById("t1").value="{$data['business_description']}"
document.getElementById("t2").value="{$data['business_announcement']}"
</script>
  <script src="__PUBLIC__static/admin/assets/js/select2.full.min.js"></script>
  <script type="text/javascript">
  $(document).ready(function() {
    $(".selectbox").select2();
  });
  </script>
      <!-- Custom Js -->
    <script src="__PUBLIC__static/admin/assets/js/custom-scripts.js"></script>



</body>
</html>
